#ifndef __POWER_H__
#define __POWER_H__

#include "stm32f10x.h"                  // Device header

#define BATT_PORT		GPIOA
#define BATT_PIN 		GPIO_Pin_0

#define LOW_Voltage     3.3f
#define FULL_Voltage    4.10f

typedef struct BATT_TYPE
{
	float BattAdc;
	float BattRead_V;
	float BattMeasure_V;
	float Batt_Alarm_V;
	float Batt_Full_V;
	int8_t Percent_Voltage;
	int8_t Percent_Alarm_Voltage;
}BATT_TYPE;

void BATT_Init(void);
void BATT_GetVoltage(void);
void Aver_Filter(float data, float *filt_data, uint8_t n);
uint16_t Get_BattADC(uint8_t ch);
void LOW_Voltage_Alave(void);
int8_t BATT_Percent(float bat_measure_V);


#endif
